<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/7/11
 * Time: 13:22
 */
namespace app\admin\model;

use think\Model;

class Smstm extends Model
{
    protected $table = 'sw_sms_template_map';
    //自动写入时间戳
    protected $autoWriteTimestamp = false;
    // 定义类型转换
    /*protected $type = [
        'birthday'    => 'timestamp:Y/m/d',
    ];*/
    // 定义自动完成的属性
    protected $insert             = [];

    protected $field = [];
    // 定义关联方法
    public function client()
    {
        return $this->belongsTo('Client','client_id','id')->bind('name');
    }
    public function provider()
    {
        return $this->belongsTo('Provider','provider_id','id')->bind([
            'provider_name'=>'name'
        ]);
    }

}